﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VideoBlog.Data.Entities
{
    public partial class Playlist : global::System.Data.Objects.DataClasses.EntityObject
    {

        public string Slug
        {
            get
            {
                char[] arr = PlaylistTitle.ToCharArray();
                arr = Array.FindAll<char>(arr, (c => (char.IsLetterOrDigit(c) || char.IsWhiteSpace(c) || c == '-')));
                string res = new string(arr);
                return res.Replace(' ', '-').ToLower();
            }
        }

    }
}
